
const Home = ()=>import("@/pages/Home")
const Register = ()=>import("@/pages/Register")
const Search = ()=>import("@/pages/Search")
const Login = ()=>import("@/pages/Login")
const Detail = ()=>import("@/pages/Detail")
const AddCartSuccess = ()=>import("@/pages/AddCartSuccess")
const ShopCart = ()=>import("@/pages/ShopCart")
const Pay = ()=>import("@/pages/Pay")
const Trade = ()=>import("@/pages/Trade")
const PaySuccess = ()=>import("@/pages/PaySuccess")
export default [
    {
        path:"/home",
        component:Home,
        name:"home"
    },
    {
        path:"/register",
        component:Register,
        name:"register",
        meta:{
            isHidden:true,
        }
    },
    {
        path:"/search/:searchKey?",
        component:Search,
        name:"search"
    },
    {
        path:"/login",
        component:Login,
        name:"login",
        meta:{
            isHidden:true,
        }
    },
    {
      path: "/detail/:skuId",
      component:Detail,
      name:"detail"
    },
    {
        path: "/addCartSuccess",
        component:AddCartSuccess,
        name:"addCartSuccess"
    },
    {
        path: "/shopCart",
        component:ShopCart,
        name:"shopCart"
    },
    {
        path: "/trade",
        component:Trade,
        name:"trade"
    },
    {
        path: "/pay",
        component:Pay,
        name:"pay"
    },
    {
        path: "/paysuccess",
        component:PaySuccess,
        name:"paysuccess"
    },
    {
        path:"/",
        redirect:"/home"
    }
]